/**
 * Company : Thai Informatic System Co., Ltd.
 * Created By : Chatree Siangklom
 * Created On : Apr 3, 2013  2:33:45 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : promis.api.excel.test
 * File Name : ExeclAction.java
 * TODO
 */
package promis.api.excel.test;

import promis.api.excel.write.ExcelInsertIntoTableServices;
import promis.api.excel.write.ExcelToDbTableServices;

/**
 * @author chatree
 *
 */
public class ExeclAction {

	public static void main(String[] args) {
		
		String owner = "SYNCHRO";
		String table_name = "EXCEL_Transfer_R1_TEMP1";
		//String filePath = "C:\\Users\\chatree\\workspace\\ExcelTested\\excel_store\\CM_RMS_05042013_R1.xls";
		//String filePath = "C:\\Users\\chatree\\workspace\\ExcelTested\\excel_store\\CM_RMS_05042013_R1_1.xls";
		String filePath = "C:\\Users\\chatree\\workspace\\ExcelTested\\excel_store\\Transfer_R1_mo.xls";
		
		try {
						
			//Step 0
			//new ExcelToDbTableServices(filePath).DropTable(owner, table_name);
			
			//Step 1
			new ExcelToDbTableServices(filePath).CreateTableFromExcel(owner, table_name, true);
			
			//Step 2
			new ExcelInsertIntoTableServices(filePath).InsertIntoTableFromExcel(owner, table_name, 0);
			
		} catch (Exception e) {	
			e.printStackTrace();
		}
	}

}
